<template>
	<view class="type_list">
		<view class="type_list_title">
			推荐:
		</view>
		<scroll-view :scroll-x="true" class="scroll-view_H">
			<view @click="search(item.name)"  v-for="(item,index) in list" :key="index" class="scroll-view-item_H">
				{{item.name}}
			</view>
		</scroll-view>
	</view>
</template>

<script>
	import mImg from '@/componts/m-img/index.vue';
	export default {
		components:{
		   mImg
		},
		props: {
			// 缺省图
			
		},
		data() {
			return {
				search_text:'',
				geshi:(pic)=>{
					return pic.replace(/\\/g , '/')
				},
				list:[]
			}
		},
		methods: {
			navTo(id){
				uni.setStorage({
					'key':'class_id',
					'data':id,
					success(){
						uni.switchTab({
							url:'/pages/classification/classification'
						})
					}
				})
				
			},
			getList(){
				this.$wqzApi.search_history({}).then(res=>{
					this.list = res.data
					console.log(this.list)
				})
			},
			search(name){
				this.$emit('item_chagne' , name)
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import url(./search_list.css);
</style>